<%@ page contentType="text/html;charset=UTF-8"%>
<%@ include file="../../views/common/taglibs.jsp"%>
  <div id="u30" class="ax_default shape">
                <div id="u30_div" class=""></div>
                <!-- Unnamed () -->
                <div id="u31" class="text" style="visibility: visible;">
                  <p><span>
                  	<c:if test="${member.type=='3'}">供应商管理</c:if>
        			<c:if test="${member.type=='4'}">代理商管理</c:if>
        			</span></p>
                </div>
  </div>
  <div class="add" align="right">
  <c:if test="${member.type=='3'}">
  <input class="btAdd" name="" value="创建供应商" type="button" 
  		onclick="doActionNoParAndCbk('core', '${appServer}/back/member/gotoGenerateProviderAccountPage.htm');" />
  </c:if>
  </div>
  <div class="search">
	    <form id="memberListFrm" name="memberListFrm" action="${appServer}/back/member/getMemberList.htm" method="post" onsubmit="return false;">
		    <table width="99%" border="0" cellspacing="0" cellpadding="0">
				<tr>
			        <td>
			      	<th>
			      		手机号：
			      	</th>
			      	<td>
			      		<input type="text" class="fl" name="memberName" value="${member.memberName}"/>
			      		<input type="hidden" name="type" value="${member.type}"/>
			      	</td>
			        <td>
			      	<th>
			      		昵称：
			      	</th>
			      	<td>
			      		<input type="text" class="fl" name="nickName" value="${member.nickName}"/>
			      	</td>
			      	
					<td class="tc"><input class="btSearch" name="" type="button" onclick="searchMembersSubmit();" /></td>
				</tr>
		    </table>
	    </form>
  </div>
  <div class="tabtxet" id="listGameWind">
    <table class="tablist" cellspacing="0" cellpadding="0">
      <tr class="tabTop">
        <td colspan="17">
        	<div class="title">
        	<c:if test="${member.type=='3'}">供应商列表</c:if>
        	<c:if test="${member.type=='4'}">代理商列表</c:if>
        	(共<strong>${page.totalCounts}</strong>条)</div>
        </td>
      </tr>
      <tr>
        <th>手机号</th>
        <th>头像</th>
		<th>昵称</th>
        <c:if test="${member.type=='3'}"><th>有效邀请码数量</th></c:if>
        <th>创建时间</th>
		<th>状态</th>
        <th>最后操作日期</th>
        <c:if test="${member.type=='3'}">
        <th>邀请码</th>
        </c:if>
        <th>操作</th>
        <c:if test="${member.type=='3'}">
        <th>上传库存更新文件</th>
        <th>发布的商品</th>
        </c:if>
      </tr>
      <c:forEach items="${memberList}" var="memberTemp" varStatus="status">
	      <tr>
	        <td>${memberTemp.memberName}</td>
	        <td><c:if test="${memberTemp.headImg!=null}">
	        <img src="${memberTemp.headImg}" alt="会员头像" height="auto" width="50px"/>
	        </c:if></td>
			<td>${memberTemp.nickName}</td>
	        <c:if test="${member.type=='3'}"><td>${memberTemp.availableInviteCodeCount}</td></c:if>
	        <td><fmt:formatDate value="${memberTemp.timeAdd}" type="both"/></td>
	        <td>
	        <c:if test="${memberTemp.status=='0'}">冻结</c:if>
	        <c:if test="${memberTemp.status=='1'}">正常</c:if>
	        </td>
			<td><fmt:formatDate value="${memberTemp.timeEdit}" type="both"/></td>
		    <c:if test="${member.type=='3'}">
	        <td>
		        <a href="javascript:doActionNoCallback('core', '${appServer}/back/member/getInviteCodesForSupplier.htm?memberId=${memberTemp.memberId}&memberListPageNum=${page.pageNum}', memberListParamNoPage);">
		        邀请码</a>
	        </td>
		    </c:if>
			<td>
		        <c:if test="${memberTemp.status=='0'}">
		        <a href="javascript:doActionNoCallback('core', '${appServer}/back/member/resumeMember.htm?memberId=${memberTemp.memberId}&pageNum=${page.pageNum}', memberListParamNoPage);">
		        启用</a>
		        </c:if>
		        <c:if test="${memberTemp.status=='1'}">
		        <a href="javascript:doActionNoCallback('core', '${appServer}/back/member/freezeMember.htm?memberId=${memberTemp.memberId}&pageNum=${page.pageNum}', memberListParamNoPage);">
		        冻结</a>
		        </c:if>
		        <a href="#" onclick="popMemberModifyDiv('${memberTemp.memberId}');">编辑</a>
	        </td>
		    <c:if test="${member.type=='3'}">
	        <td>
		        <c:if test="${memberTemp.status=='1'}">
		        <a href="#" onclick="popUpdateStockDiv('${memberTemp.memberId}', '${memberTemp.memberName}');">上传库存更新文件</a>
		        </c:if>
	        </td>
	        <td>
		        <a href="javascript:doActionNoParAndCbk('core', '${appServer}/back/item/getItemList.htm?memberName=${memberTemp.memberName}');">
		        发布的商品</a>
	        </td>
		    </c:if>
	      </tr>
      </c:forEach>
      <tr>
      	<td colspan="17">
	      	共${page.totalPages}页 
	      	第${page.pageNum}页 
	      	<c:if test="${!page.showFirst}">首页</c:if>
	      	<c:if test="${page.showFirst}"><a href="#" onclick="doActionNoCallback('core', '${appServer}/back/member/getMemberList.htm?pageNum=1', memberListParamNoPage);">首页</a></c:if>
	      	<c:if test="${!page.showPrevious}">上一页</c:if>
	      	<c:if test="${page.showPrevious}"><a href="#" onclick="doActionNoCallback('core', '${appServer}/back/member/getMemberList.htm?pageNum=${page.pageNum-1}', memberListParamNoPage);">上一页</a></c:if>
	      	<c:if test="${!page.showNext}">下一页</c:if>
	      	<c:if test="${page.showNext}"><a href="#" onclick="doActionNoCallback('core', '${appServer}/back/member/getMemberList.htm?pageNum=${page.pageNum+1}', memberListParamNoPage);">下一页</a></c:if>
	      	<c:if test="${!page.showLast}">尾页</c:if>
	      	<c:if test="${page.showLast}"><a href="#" onclick="doActionNoCallback('core', '${appServer}/back/member/getMemberList.htm?pageNum=${page.totalPages}', memberListParamNoPage);">尾页</a></c:if>
      	</td>
      </tr>
    </table>
  </div>
  
  <div id="memberPopWindow"></div>
	<script type="text/javascript">
	    memberListParamNoPage = {'nickName' : '${member.nickName}', 'memberName' : '${member.memberName}', 'type' : '${member.type}'};
    </script>